﻿import React, { Component } from 'react';
import PropTypes from 'prop-types';
import './Detail.css'

export default class extends Component {
    static propTypes = {
        msg: PropTypes.string.isRequired,
        receivers: PropTypes.string
    }
    render() {
        return (
            <div className='his-detail'>
                <div>
                    <span className='his-detail-title'>【消息内容】</span>
                    <span className='his-detail-cnt'>{this.props.msg}</span>
                </div>
                {this.props.receivers && < div >
                    <span className='his-detail-title'>【接收人】</span>
                    <span className='his-detail-cnt'>{this.props.receivers}</span>
                </div>}
            </div>
        )
    }
}